﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ddcCajamarca.BusinessEntities.AgendaCultural;
using  System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;


namespace ddcCajamarca.Repository.Mapping
{
   public class AmbienteMap:EntityTypeConfiguration<Ambiente>
   {
       public AmbienteMap()
       {
           this.HasKey(e => e.Id);
           this.Property(e => e.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

           this.Property(e => e.NombreAmbiente).IsRequired().HasMaxLength(200);
           this.Property(e => e.Direccion).IsRequired().HasMaxLength(200);
           this.Property(e => e.Descripcion).IsOptional().HasMaxLength(200);
           this.Property(e => e.CantidadPersonas).IsRequired();

           this.ToTable("Ambiente");
           this.Property(e => e.Id).HasColumnName("IdAmbiente");
           this.Property(e => e.NombreAmbiente).HasColumnName("NomAmbiente");
           this.Property(e => e.Direccion).HasColumnName("Direccion");
           this.Property(e => e.Descripcion).HasColumnName("Descripcion");
           this.Property(e => e.CantidadPersonas).HasColumnName("CantidadPersonas");
       }
   }
}
